package com.schoolComments.controller;


import com.schoolComments.dto.Result;
import com.schoolComments.service.IFollowService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 */
@RestController
@RequestMapping("/follow")
public class FollowController {
    @Resource
    private IFollowService followService;

    @GetMapping("/or/not/{id}")
    public Result followOrNot(@PathVariable Long id) {
        return followService.followOrNot(id);
    }

    @PutMapping("/{id}/{trueOrFalse}")
    public Result follow(@PathVariable Long id, @PathVariable Boolean trueOrFalse ){
        return followService.follow(id, trueOrFalse);
    }

    @GetMapping("/common/{id}")
    public Result commonLike(@PathVariable Long id){
        return followService.commonLike(id);
    }



}
